Skip to content

fix(FOUR-34193): resolve V1.1 TaskController from the container on optimized index - #9115

Merged
pmPaulis merged 1 commit into
nightly/2026.17-perfomancefrom
bugfix/FOUR-34193
Oct 28, 2026
Merged

pmPaulis merged 1 commit into
nightly/2026.17-perfomancefrom
bugfix/FOUR-34193

Conversation

@rodriquelca

@rodriquelca rodriquelca commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Issue & Reproduction Steps

GET /api/1.0/tasks with OPTIMIZED_TASKS_ENABLED=true (default) throws ArgumentCountError: new V1_1TaskController() skips DI for TaskCompletionRawService. Seen in Octane/FrankenPHP on Tasks inbox.

Solution

  • Resolve V1_1TaskController via app() so Laravel injects TaskCompletionRawService.
  • Add a regression test that GET /tasks with the flag on returns 200.

How to Test

php vendor/bin/phpunit tests/Feature/Api/TaskControllerTest.php --filter testIndexResolvesOptimizedV11ControllerFromContainer

Open Tasks inbox with the flag on (reload Octane after deploy). List should load, no 500.

Related Tickets & Packages

Code Review Checklist

  • I have pulled this code locally and tested it on my instance, along with any associated packages.
  • This code adheres to ProcessMaker Coding Guidelines.
  • This code includes a unit test or an E2E test that tests its functionality, or is covered by an existing test.
  • This solution fixes the bug reported in the original ticket.
  • This solution does not alter the expected output of a component in a way that would break existing Processes.
  • This solution does not implement any breaking changes that would invalidate documentation or cause existing Processes to fail.
  • This solution has been tested with enterprise packages that rely on its functionality and does not introduce bugs in those packages.
  • This code does not duplicate functionality that already exists in the framework or in ProcessMaker.
  • This ticket conforms to the PRD associated with this part of ProcessMaker.

@cursor

cursor Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

PR Summary

Low Risk
Single delegation-path fix with no change to non-optimized listing behavior; covered by a regression test.

Overview
When optimized tasks are enabled, TaskController::index no longer instantiates V1_1TaskController with new. It resolves the controller through app(V1_1TaskController::class) so Laravel injects TaskCompletionRawService, fixing the ArgumentCountError that broke GET /tasks (e.g. Tasks inbox under Octane/FrankenPHP).

A feature test asserts GET /tasks with processmaker_optimized_tasks_enabled on returns 200.

Reviewed by Cursor Bugbot for commit a4e5b13. Bugbot is set up for automated code reviews on this repo. Configure here.

@rodriquelca
rodriquelca requested a review from pmPaulis October 28, 2026 13:48
@decisions-sonarqube

Copy link
Copy Markdown

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarQube

@pmPaulis
pmPaulis merged commit 89cad74 into nightly/2026.17-perfomance Oct 28, 2026
11 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants